#define _CRT_SECURE_NO_WARNINGS 520
#include<stdio.h>

int count_one_of_bits(int n)
{
	int count = 0;
	for(int i=0;i<32;i++)
	{
		if (((n >> i) & 1) == 1)
		{
			count++;
		}
	}
	return count;
}



int main()
{
	int n = 0;
	scanf("%d", &n);
	int count = count_one_of_bits(n);
	printf("%d ", count);
	return 0;
}